<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8" />	
	<title><?=$this->admin->config['sitename']?> Administration Login</title>	
	<script type="text/javascript" src="<?=url_tmpl()?>js/jquery.js"></script>
	 <link  media="screen" rel="stylesheet" type="text/css" href="<?=url_tmpl()?>login.css" />
       <script>
  $(document).ready(function(){
  	  <?php if(isset($this->admin->login)):?>$("#submit").focus();<?php endif;?>
	  $("#submit").click(function(){
	  		$("#username").css('border','1px #cdcdcd solid');
			$("#password").css('border','1px #cdcdcd solid');
			$("#error_notification").hide();
	  		
			

			$("#ajax_loading").show();
			$("#submit").hide();
			$("#exit").hide();
			$("#password2").attr('readonly',true);
			$("#password").attr('readonly',true);
		});
		
		function show_err(msg)
		{
			$("#ajax_loading").hide();
			$("#submit").show();
			$("#error_notification").show();
			$("#error_notification").html(msg);
		}
		
		$(this).keypress(function(event){
				if (event.keyCode == '13') {
					 $("#submit").click();
				}
				 
		});
		
		$("#reload").click(function(){
			$("#loading").show();
			$(this).hide();
			//$('#captcha').contentWindow.location.reload(true);
			$("#icaptcha").attr("src","<?php echo admin_url()?>authorize/captcha<?php echo url_suffix()?>");	
			
			$("#loading").hide();
			$(this).show();
		});
		
	});
	</script>
</head>

<body>

<div id="box">
	<h1>
		<?=$this->admin->config['sitename']?> Administration
	</h1>
	<p style="color:#F00;">
		Chú ý: <?=lang('changpass2')?>
	</p>
    <?php $error = $this->admin->GetFlashData('loginerror');
if(strlen($error)>0){
?>
<div id="error_notification"><?=$error?></div>
<?php }?>
   
	<center>
	<form action="<?=admin_url()?>authorize/savepass<?=url_suffix()?>" method="post" style="width:260px; text-align:left;">

		<p>
		<label for="password"><?=lang('password')?></label><br />
		<input type="password" tabindex="2" name="user_session[password]" id="password" class="input" >
		</p>
        <p>
		<label for="password"><?=lang('conf-pass')?></label><br />
		<input type="password" tabindex="2" name="user_session[password2]" id="password2" class="input" >
		</p>
        <p>
		<label for="captcha"><?=lang('captcha')?></label><br />
		<input type="text" tabindex="3" name="user_session[captcha]" id="captcha" class="input captcha" ><iframe id="icaptcha" width="80px" scrolling="no" height="27px" frameborder="0" marginwidth="0px" marginheight="0px" style="border: 0px; margin:0px; padding:0px; float:left;" src="<?php echo admin_url()?>authorize/captcha<?php echo url_suffix()?>"></iframe><img id="loading" title="Đang tạo mã xác nhận mơi" align="absmiddle" src="<?=url_tmpl();?>images/spinner.gif" style="display:none; margin-left:5px; margin-top:5px;" /><img id="reload" title="Tạo mã xác nhận khác" style="cursor:pointer; margin-left:5px; margin-top:5px;" align="absmiddle" src="<?=url_tmpl();?>images/reload.gif" />
        <div style="clear:both"></div>
		</p>

		
		<input class="button" id="submit" type="submit" tabindex="4" name="submit" value="<?=lang('save')?>">
		<div class="clearfix"></div>
	</form>
	</center>
	<footer>
		<p class="author">
			©&nbsp;2011<?=(date("Y")>2011)?' - '.date("Y"):''?>&nbsp;<?=$this->admin->config['copyright']?>&nbsp;-&nbsp;Designed by Ban Ứng dụng CNTT
		</p>
	</footer>
    </div>

</body>

</html>